package com.rw.common.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "car_info",createIndex = false)
public class EsCarInfo {
    @Id
    @Field(type = FieldType.Integer,name = "id")
    private Integer id;

    @Field(store = true,type = FieldType.Double)
    private Double price;

    @Field(store = true, analyzer = "ik_max_word", type = FieldType.Double)
    private Double distance;

    @Field(store = true,type = FieldType.Date)
    private Date firstUpTime;
    @Field(store = true,type = FieldType.Date)
    private Date yearCheckTime;
    @Field(store = true,type = FieldType.Date)
    private Date periodTime;
    @Field(store = true, analyzer = "ik_max_word", type = FieldType.Text)
    private String lookAddress;

    @Field(store = true,type = FieldType.Keyword)
    private String carYear;
    @Field(name = "name",store = true, analyzer = "ik_max_word", type = FieldType.Text)
    private String name;
    @Field(type = FieldType.Integer)
    private String cid;
    @Field(store = true, analyzer = "ik_max_word", type = FieldType.Text)
    private String carDesc;
    @Field(store = true,type = FieldType.Double)
    private Double carItemSize;
    @Field(store = true,type = FieldType.Double)
    private Double carWheelSize;

    @Field(store = true, analyzer = "ik_max_word", type = FieldType.Text)
    private String carResouce;
    @Field(store = true, analyzer = "ik_max_word", type = FieldType.Text)
    private String carType;
}
